import Goods from "./Goods";
import { isExperationDateLess } from "./methods/SellInMethod";

class AgedBrie extends Goods {
    constructor(type: string, SellIn: number, Quality: number) {
        super(type, SellIn, Quality)
    }
    updateGoodsInfo() {
        this.isOutOfRange()
        this.updateQualityByAdd()
        this.updateExperationDateByMinus()
        if(isExperationDateLess(this.sellIn, 0)) {
            this.updateQualityByAdd()
        }
    }
}
export default AgedBrie